package com.taotao.springboot2.common.mybatis.plus.update;

import lombok.AccessLevel;
import lombok.NoArgsConstructor;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionManager;

/**
 * <p>
 *
 * </p>
 *
 * @author fanbeibei
 * @version 1.0.0
 * @date 2023/7/14 14:42
 */
@NoArgsConstructor(access = AccessLevel.PRIVATE)
public class MybatisMapperUtil {

    /**
     * 从mapper对象获取
     *
     * @param mapper
     * @return
     * @param <T>
     */
    public static <T> SqlSession  getSqlSession(T mapper){

        return null;


    }


    /**
     * 从SqlSessionManager获取
     *
     *
     */

    public static <T> SqlSession  getCurrSqlSession(){
        //TODO 如何获取 SqlSessionManager 还要去翻mybatis源码
        SqlSessionManager sqlSessionManager = null;

        return sqlSessionManager.openSession();


    }
}
